﻿using System;
using System.Collections.Generic;
using System.Text;
using RTXServerApi;

namespace LGCourt.Untils
{
    public class RTX_Until
    {

        /// <summary>
        /// 单点登陆SessionKey
        /// </summary>
        /// <param name="pName"></param>
        /// <returns></returns>
        public static string GetSessionKey(string pName, string pServerIP, int pServerPort)
        {
            RTXObjectClass RTXObj = new RTXObjectClass();
            RTXObj.ServerIP = pServerIP;
            RTXObj.ServerPort = pServerPort;
            RTXCollectionClass RTXParams = new RTXCollectionClass();
            RTXObj.Name = "SYSTOOLS";
            RTXParams.Add("USERNAME", pName);
            object sSessionKey = RTXObj.Call2(RTXServerApi.enumCommand_.PRO_SYS_USERLOGIN, RTXParams);
            return sSessionKey.ToString();
        }
    }
}
